﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JMY_Models;
using System.Data;
namespace JMY_BLL
{
    public class DocLoginBLL:BaseBLL<T_Doc_Logins_Model>
    {
        /// <summary>
        /// 指定需要实例化的工厂子类名称
        /// </summary>
        private const string _type = "DocLoginDAL";
        /// <summary>
        /// 
        /// </summary>
        private JMY_IDAL.DocLoginIDAL _Dal;
        /// <summary>
        /// 构造函数
        /// </summary>
        public DocLoginBLL() : base(_type)
        {
            _Dal = base.Dal as JMY_IDAL.DocLoginIDAL;
            if (_Dal==null)
            {
                throw new NullReferenceException(_type);
            }
        }
        /// <summary>
        /// 登录平台
        /// </summary>
        /// <param name="LogName"></param>
        /// <param name="LogPwd"></param>
        /// <returns></returns>
        public int DocLogins(string LogName, string LogPwd)
        {
            return _Dal.DocLogins(LogName,LogPwd);

        }
        /// <summary>ssd
        /// 显示管理员信息
        /// </summary>
        /// <returns></returns>
        public List<T_Doc_Logins_Model>  DocGuanLiYuanShow()
        {
            return _Dal.DocGuanLiYuanShow();
        }
        /// <summary>
        /// 添加管理员信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public int DocGuanLiYuanAdd(string name, string pwd)
        {
            return _Dal.DocGuanLiYuanAdd(name, pwd);
        }
        /// <summary>
        /// 删除管理员信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>

        public int DocGuanLiYuanDel(int id)
        {
            return _Dal.DocGuanLiYuanDel(id);
        }
        /// <summary>
        /// 反填管理员信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<T_Doc_Logins_Model> DocGuanLiYuanUpt1(int id)
        {
            return _Dal.DocGuanLiYuanUpt(id);
        }
        /// <summary>
        /// 修改管理员信息
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public int DocGuanLiYuanUpt2(T_Doc_Logins_Model m)
        {
            return _Dal.DocGuanLiYuanUpt2(m);
        }
    }
}
